-
-
Notifications
You must be signed in to change notification settings - Fork 539
Fix Tux' velocity on frozen enemy #3341
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Fix Tux' velocity on frozen enemy #3341
Conversation
|
||
if (hit.bottom && badguy->is_frozen()) | ||
m_on_ground_flag = true; | ||
m_physic.set_velocity_y(0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the set_velocity_y
call supposed to be part of the if statement in line 2416 or not?
If it does, it needs braces after the if. If not, the indentation needs to get fixed or, even better, the call needs to be put in a new line.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See the above comment
Oh thanks. Didn't notice that. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't test this in-game. Only code style
Addition to #3232 . Tux' velocity increased while being on a jumping frozen enemy. I fixed it by setting the velocity to zero.